/*
 * @Author: jhw
 * @Date: 2025-08-14 22:23:00
 * @LastEditors: jhw
 * @LastEditTime: 2025-08-23 14:44:43
 * @Description:
 */

// import ColorEditor from '@/components/SurveyComs/EditItems/ColorEditor.vue';
// import DescEditor from '@/components/SurveyComs/EditItems/DescEditor.vue';
// import ItalicEditor from '@/components/SurveyComs/EditItems/ItalicEditor.vue';
// import PositionEditor from '@/components/SurveyComs/EditItems/PositionEditor.vue';
// import SizeEditor from '@/components/SurveyComs/EditItems/SizeEditor.vue';
// import NoteDescTypeEditor from '@/components/SurveyComs/EditItems/NoteDescTypeEditor.vue';
// import TitleEditor from '@/components/SurveyComs/EditItems/TitleEditor.vue';
// import WeightEditor from '@/components/SurveyComs/EditItems/WeightEditor.vue';
// import OptionsPicEditor from '@/components/SurveyComs/EditItems/OptionsPicEditor.vue';
// import RateTextEditor from '@/components/SurveyComs/EditItems/RateTextEditor.vue';
// import TextInputTypeEditor from '@/components/SurveyComs/EditItems/TextInputTypeEditor.vue';
// import DateTypeEditor from '@/components/SurveyComs/EditItems/DateTypeEditor.vue';
// import OptionsEditor from '@/components/SurveyComs/EditItems/OptionsEditor.vue';

// import SingleSelect from '@/components/SurveyComs/Materials/SelectComs/SingleSelect.vue';
// import MultipleSelect from '@/components/SurveyComs/Materials/SelectComs/MultipleSelect.vue';
// import OptionSelect from '@/components/SurveyComs/Materials/SelectComs/OptionSelect.vue';
// import TextInput from '@/components/SurveyComs/Materials/SelectComs/TextInput.vue';
// import NoteDesc from '@/components/SurveyComs/Materials/SelectComs/NoteDesc.vue';
// import PersonalInfoScore from '@/components/SurveyComs/Materials/SelectComs/PersonalInfoScore.vue';
// import DateTime from '@/components/SurveyComs/Materials/SelectComs/DateTime.vue';
// import SinglePicSelect from '@/components/SurveyComs/Materials/SelectComs/SinglePicSelect.vue';

// const SingleSelect = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/SingleSelect.vue'),
// );
// const MultipleSelect = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/MultipleSelect.vue'),
// );
// const OptionSelect = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/OptionSelect.vue'),
// );
// const SinglePicSelect = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/SinglePicSelect.vue'),
// );
// const TextInput = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/TextInput.vue'),
// );
// const NoteDesc = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/NoteDesc.vue'),
// );
// const PersonalInfoScore = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/PersonalInfoScore.vue'),
// );
// const DateTime = defineAsyncComponent(
//   () => import('@/components/SurveyComs/Materials/SelectComs/DateTime.vue'),
// );
// const TitleEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/TitleEditor.vue'),
// );
// const DescEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/DescEditor.vue'),
// );
// const OptionsEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/OptionsEditor.vue'),
// );
// const WeightEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/WeightEditor.vue'),
// );
// const ItalicEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/ItalicEditor.vue'),
// );
// const ColorEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/ColorEditor.vue'),
// );
// const TextInputTypeEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/TextInputTypeEditor.vue'),
// );
// const PositionEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/PositionEditor.vue'),
// );
// const SizeEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/SizeEditor.vue'),
// );
// const NoteDescTypeEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/NoteDescTypeEditor.vue'),
// );
// const DateTypeEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/DateTypeEditor.vue'),
// );
// const RateTextEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/RateTextEditor.vue'),
// );
// const OptionsPicEditor = defineAsyncComponent(
//   () => import('@/components/SurveyComs/EditItems/OptionsPicEditor.vue'),
// );

import type { ComponentMap } from '@/types';
import { markRaw } from 'vue';
import {
  SingleSelect,
  MultipleSelect,
  OptionSelect,
  SinglePicSelect,
  TextInput,
  NoteDesc,
  PersonalInfoScore,
  DateTime,
} from './exportDefaultComponent';
import {
  TitleEditor,
  DescEditor,
  OptionsEditor,
  PositionEditor,
  SizeEditor,
  WeightEditor,
  ItalicEditor,
  ColorEditor,
  TextInputTypeEditor,
  NoteDescTypeEditor,
  DateTypeEditor,
  RateTextEditor,
  OptionsPicEditor,
} from './exportEditorComponent';

export const componentMap: ComponentMap = {
  // 画布组件
  'single-select': markRaw(SingleSelect),
  'multiple-select': markRaw(MultipleSelect),
  'option-select': markRaw(OptionSelect),
  'single-pic-select': markRaw(SinglePicSelect),
  'text-input': markRaw(TextInput),
  'note-desc': markRaw(NoteDesc),
  'personal-info-gender': markRaw(SingleSelect),
  'personal-info-education': markRaw(SingleSelect),
  'personal-info-score': markRaw(PersonalInfoScore),
  'date-time': markRaw(DateTime),

  // 编辑组件
  'title-editor': markRaw(TitleEditor),
  'desc-editor': markRaw(DescEditor),
  'options-editor': markRaw(OptionsEditor),
  'position-editor': markRaw(PositionEditor),
  'size-editor': markRaw(SizeEditor),
  'weight-editor': markRaw(WeightEditor),
  'italic-editor': markRaw(ItalicEditor),
  'color-editor': markRaw(ColorEditor),
  'text-input-type-editor': markRaw(TextInputTypeEditor),
  'note-desc-type-editor': markRaw(NoteDescTypeEditor),
  'date-type-editor': markRaw(DateTypeEditor),
  'rate-text-editor': markRaw(RateTextEditor),
  'options-pic-editor': markRaw(OptionsPicEditor),
};
